package br.com.winesys.geta.databinding.componentBinder;

import javax.swing.JComboBox;
import br.com.winesys.geta.databinding.ComponentBinder;

public final class JComboBoxBinder implements ComponentBinder<JComboBox> {

	private static final ComponentBinder<JComboBox> INSTANCE = new JComboBoxBinder();

	public static ComponentBinder<JComboBox> getInstance() {
		return INSTANCE;
	}

	private JComboBoxBinder() {
	}

	@Override
	public Object read(JComboBox component) {
		return component.getSelectedItem();
	}

	@Override
	public void write(JComboBox component, Object value) {
		component.setSelectedItem(value);
	}
}
